<?php echo form_button(array('id'=>'add-permission', 'onClick'=>'openAddPermissionPopup()','name'=>'add', 'class'=>'btn blue', 'value'=>lang('escort_permission_add_permission'), 'content'=>lang('escort_permission_add_permission')))?>
<section class="item">
<?php
	if($permissionList){
?>
		<table class="table-list">
			<tr>
				<th><?php echo lang('escort_permission_id')?></th>
				<th><span><?php echo lang('escort_permission_name')?></span></th>
				<th class="actions"><?php echo lang('escort_permission_actions')?></th>
			</tr>
			
	<?php
		foreach ($permissionList as $permission){ 
	?>
			<tr>
				<td>
					<?php echo $permission->id ?>
				</td>
				<td class="collapse">
					<?php echo $permission->name ?>
				</td>
				<td class="actions">
				<a class="button edit" onclick="return editPermission('<?php echo $permission->id ?>')" href="#"><?php echo lang('escort_permission_edit_permission')?></a>
				<a class="button delete" onclick="return deletePermission('<?php echo $permission->id ?>', '<?php echo lang('escort_permission_delete_confirm')?>')" href="#"><?php echo lang('escort_permission_delete_permission')?></a>
				</td>
			</tr>
	<?php
		}
	?>
		</table>
<?php
	}else{ 
?>
	<p>
		<?php echo lang('escort_permission_no_permission')?>
	</p>
<?php
	} 
?>
</section>

<div id="basic-modal-content-permission">
	<div class="popup-body permission-popup">
		<section class="title">
			<h4><?php echo lang('escort_permission_add_permission')?></h4>
		</section>
		<form id="add-permission-form" action="">
			<section class="item">
				<div class="form_inputs">
					<fieldset>
						<ul>
							<li class="even">
								<label for="first_name"><?php echo lang('escort_permission_name')?><span>*</span></label>
								<div class="input">
									<input type="hidden" value="" name="permission_id" id="permission_id"/>
									<input class="required" type="text" id="permission" value="" name="permission">
								</div>
							</li>
						</ul>
					</fieldset>
				</div>
				<div>
					<?php echo form_button(array('id'=>'save-permission', 'onClick'=>'savePermission()','name'=>'add', 'class'=>'btn blue', 'value'=>lang('escort_permission_save'), 'content'=>lang('escort_permission_save')))?>
					<?php echo form_button(array('id'=>'cancel-permission', 'name'=>'add', 'class'=>'btn blue modalCloseImg simplemodal-close', 'value'=>lang('escort_permission_cancel'), 'content'=>lang('escort_permission_cancel')))?>
				</div>
			</section>
		</form>
	</div>
</div>